{"ast":null,"code":"function easeInOutSin(time) {\n  return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\nexport default function animate(property, element, to) {\n  let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  let cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : () => {};\n  const {\n    ease = easeInOutSin,\n    duration = 300 // standard\n  } = options;\n  let start = null;\n  const from = element[property];\n  let cancelled = false;\n  const cancel = () => {\n    cancelled = true;\n  };\n  const step = timestamp => {\n    if (cancelled) {\n      cb(new Error('Animation cancelled'));\n      return;\n    }\n    if (start === null) {\n      start = timestamp;\n    }\n    const time = Math.min(1, (timestamp - start) / duration);\n    element[property] = ease(time) * (to - from) + from;\n    if (time >= 1) {\n      requestAnimationFrame(() => {\n        cb(null);\n      });\n      return;\n    }\n    requestAnimationFrame(step);\n  };\n  if (from === to) {\n    cb(new Error('Element already at target position'));\n    return cancel;\n  }\n  requestAnimationFrame(step);\n  return cancel;\n}","map":{"version":3,"names":["easeInOutSin","time","Math","sin","PI","animate","property","element","to","options","cb","ease","duration","start","from","cancelled","cancel","step","timestamp","Error","min","requestAnimationFrame"],"sources":["/data/messenger.client/node_modules/@mui/material/esm/internal/animate.js"],"sourcesContent":["function easeInOutSin(time) {\n  return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nexport default function animate(property, element, to, options = {}, cb = () => {}) {\n  const {\n    ease = easeInOutSin,\n    duration = 300 // standard\n\n  } = options;\n  let start = null;\n  const from = element[property];\n  let cancelled = false;\n\n  const cancel = () => {\n    cancelled = true;\n  };\n\n  const step = timestamp => {\n    if (cancelled) {\n      cb(new Error('Animation cancelled'));\n      return;\n    }\n\n    if (start === null) {\n      start = timestamp;\n    }\n\n    const time = Math.min(1, (timestamp - start) / duration);\n    element[property] = ease(time) * (to - from) + from;\n\n    if (time >= 1) {\n      requestAnimationFrame(() => {\n        cb(null);\n      });\n      return;\n    }\n\n    requestAnimationFrame(step);\n  };\n\n  if (from === to) {\n    cb(new Error('Element already at target position'));\n    return cancel;\n  }\n\n  requestAnimationFrame(step);\n  return cancel;\n}"],"mappings":"AAAA,SAASA,YAAY,CAACC,IAAI,EAAE;EAC1B,OAAO,CAAC,CAAC,GAAGC,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,EAAE,GAAGH,IAAI,GAAGC,IAAI,CAACE,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC;AACzD;AAEA,eAAe,SAASC,OAAO,CAACC,QAAQ,EAAEC,OAAO,EAAEC,EAAE,EAA+B;EAAA,IAA7BC,OAAO,uEAAG,CAAC,CAAC;EAAA,IAAEC,EAAE,uEAAG,MAAM,CAAC,CAAC;EAChF,MAAM;IACJC,IAAI,GAAGX,YAAY;IACnBY,QAAQ,GAAG,GAAG,CAAC;EAEjB,CAAC,GAAGH,OAAO;EACX,IAAII,KAAK,GAAG,IAAI;EAChB,MAAMC,IAAI,GAAGP,OAAO,CAACD,QAAQ,CAAC;EAC9B,IAAIS,SAAS,GAAG,KAAK;EAErB,MAAMC,MAAM,GAAG,MAAM;IACnBD,SAAS,GAAG,IAAI;EAClB,CAAC;EAED,MAAME,IAAI,GAAGC,SAAS,IAAI;IACxB,IAAIH,SAAS,EAAE;MACbL,EAAE,CAAC,IAAIS,KAAK,CAAC,qBAAqB,CAAC,CAAC;MACpC;IACF;IAEA,IAAIN,KAAK,KAAK,IAAI,EAAE;MAClBA,KAAK,GAAGK,SAAS;IACnB;IAEA,MAAMjB,IAAI,GAAGC,IAAI,CAACkB,GAAG,CAAC,CAAC,EAAE,CAACF,SAAS,GAAGL,KAAK,IAAID,QAAQ,CAAC;IACxDL,OAAO,CAACD,QAAQ,CAAC,GAAGK,IAAI,CAACV,IAAI,CAAC,IAAIO,EAAE,GAAGM,IAAI,CAAC,GAAGA,IAAI;IAEnD,IAAIb,IAAI,IAAI,CAAC,EAAE;MACboB,qBAAqB,CAAC,MAAM;QAC1BX,EAAE,CAAC,IAAI,CAAC;MACV,CAAC,CAAC;MACF;IACF;IAEAW,qBAAqB,CAACJ,IAAI,CAAC;EAC7B,CAAC;EAED,IAAIH,IAAI,KAAKN,EAAE,EAAE;IACfE,EAAE,CAAC,IAAIS,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACnD,OAAOH,MAAM;EACf;EAEAK,qBAAqB,CAACJ,IAAI,CAAC;EAC3B,OAAOD,MAAM;AACf"},"metadata":{},"sourceType":"module"}